<script type="text/javascript">
  function submit_create_folder(){
    $.post('<?php echo site_url('admin/'.$this->router->fetch_class() . '/save_folder') ?>',{
      'path' : $('#path').val(),
      'folder_name' : $('#folder_name').val()
    }, function(data){
      alert(data.message);
      window.location.reload(true);
      return false;
    },'json');
    return false;
  }
</script>
<form accept-charset="utf-8" method="post" class="crud" 
      onsubmit="submit_create_folder();return false;"
      action="<?php echo site_url('admin/'.$this->router->fetch_class() . '/save_folder') ?>">
  <input type="hidden" name="path" id="path" value="<?php echo $path ? $path : ''?>">
  <div class="form_inputs">
    <ul>      
      <li>
        <label for="name"><?php echo $this->lang->line('label.folder.name')?><span>*</span></label>
        <div class="">
          <input type="text" value="<?php echo empty($folder_name)?'':$folder_name?>" 
                 name="folder_name" id="folder_name">
        </div>    		
      </li>
    </ul>
    <div class="buttons alignleft">
      <button class="btn blue" value="save" name="btnAction" type="submit">
        <span><?php echo $this->lang->line('btn.save') ?></span>
      </button>
    </div>
  </div>
</form>